﻿@using Pyramid.Extentions
@using Pyramid.Mvc.Html
@model Pyramid.Models.Customer

<div class="pageContent">
	@using (Html.BeginForm("Edit", "Customer", FormMethod.Post, new {@class = "pageForm required-validate", onsubmit = "return validateCallback(this, navTabAjaxDone);"}))
	{
		<div class="pageFormContent" layouth="60">
			@Html.HiddenFor(x => x.Id)
			@Html.HiddenFor(x => x.AdminCenterId)
			@Html.HiddenFor(x => x.MemberCenterId)
			<p>
				@Html.LabelFor(model => model.Code)
				@Html.CodeFieldFor(model => model.Code)
			</p>
			<p>
				@Html.LabelFor(model => model.FullName)
				@Html.TextBoxFor(model => model.FullName, new {@class = "required", minlength = "2", maxlength = "6"})
			</p>
			<p>
				@Html.LabelFor(model => model.EnglishName)
				@Html.TextBoxFor(model => model.EnglishName, new {maxlength = "20"})
			</p>
			<p>
				@Html.LabelFor(model => model.Gender)
				@Html.DropDownList("Gender", Model.GenderEnum.ToSelectList(), new {@class = "required"})
			</p>
			<p>
				@Html.LabelFor(model => model.Birthday)
				@Html.DateInputFor(model => model.Birthday, "required")
			</p>
			<p>
				@Html.LabelFor(model => model.IdCard)
				@Html.TextBoxFor(model => model.IdCard, new {@class = "required"})
			</p>
			<p>
				@Html.LabelFor(model => model.CardType)
				@Html.DropDownList("CardType", Model.CardTypeEnum.ToSelectList(), new {@class = "required"})
			</p>
			<p>
				@Html.LabelFor(model => model.PostalCode)
				@Html.TextBoxFor(model => model.PostalCode)
			</p>
			<p class="nowrap">
				@Html.LabelFor(model => model.Address)
				@Html.TextBoxFor(model => model.Address, new {@class = "longText"})
			</p>
			<div class="divider"></div>
			<p>
				@Html.LabelFor(model => model.Profession)
				@Html.TextBoxFor(model => model.Profession)
			</p>
			<p>
				@Html.LabelFor(model => model.Education)
				@Html.TextBoxFor(model => model.Education)
			</p>
			<p>
				@Html.LabelFor(model => model.Tel)
				@Html.TextBoxFor(model => model.Tel)
			</p>
			<p>
				@Html.LabelFor(model => model.Mobile)
				@Html.TextBoxFor(model => model.Mobile, new {@class = "required"})
			</p>
			<p>
				@Html.LabelFor(model => model.Fax)
				@Html.TextBoxFor(model => model.Fax)
			</p>
			<p>
				@Html.LabelFor(model => model.Email)
				@Html.TextBoxFor(model => model.Email)
			</p>
			<p>
				@Html.LabelFor(model => model.Interest)
				@Html.TextBoxFor(model => model.Interest)
			</p>
			<p>
				@Html.LabelFor(model => model.MaritalStatus)
				@Html.DropDownList("MaritalStatus", Model.MaritalStatusEnum.ToSelectList(), new {@class = "required"})
			</p>
			<p>
				@Html.LabelFor(model => model.RevenueLevel)
				@Html.DropDownList("RevenueLevel", Model.RevenueLevelEnum.ToSelectList(), new {@class = "required"})
			</p>
			<p class="nowrap">
				@Html.LabelFor(model => model.Remark)
				@Html.TextAreaFor(model => model.Remark, new {@class = "longText longParagraph"})
			</p>
			<div class="divider"></div>
			<p>
				@Html.LabelFor(model => model.ReceiveNews)
				@Html.EditorFor(model => model.ReceiveNews)
			</p>
			<p>
				@Html.LabelFor(model => model.IsVip)
				@Html.CheckBoxFor(model => model.IsVip)
			</p>
			<div class="divider"></div>
			<p>
				@Html.LabelFor(model => model.CreateUserId)
				@Html.ReadonlyFieldFor(model => model.CreateUserId)
			</p>
			<p>
				@Html.LabelFor(model => model.CreateTime)
				@Html.ReadonlyDateTimeFor(model => model.CreateTime)
			</p>
			<p>
				@Html.LabelFor(model => model.EditUserId)
				@Html.ReadonlyFieldFor(model => model.EditUserId)
			</p>
			<p>
				@Html.LabelFor(model => model.EditTime)
				@Html.ReadonlyDateTimeFor(model => model.EditTime)
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div>
				</li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	}
</div>